package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.EmployeeDTO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.entity.Employee;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName: Employee
 * @Author: zw
 * @Description: 出百万拳，行万里路；
 * @Create 2024/8/7-23:22
 * @Version 1.0
 */
@Mapper
public interface EmployeeMapper {
    @AutoFill(OperationType.INSERT)
    void insert(Employee employee);

    Employee getByUsername(@Param("username") String username);

    Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    @AutoFill(OperationType.UPDATE)
    void update(Employee employee);

    Employee getById(@Param("id") Long id);
}
